package com.ua.secure.dictionary.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ua.common.model.Dictionary;
import com.ua.common.model.DictionaryItem;
import com.ua.secure.dictionary.persistence.DictionaryMapper;

/**
 * @author zhaoruiqing
 * 2013-5-03
 */
@Service
public class DictionaryServiceImpl implements DictionaryService {
	
	@Autowired
	private DictionaryMapper mapper;

	@Override
	public List<DictionaryItem> qryDictionaryItemByDictId(String dictId) {
		return mapper.qryDictionaryItemByDictId(dictId);
	}

	@Override
	public List<DictionaryItem> qryDictionaryItemByDictCode(String dictCode) {
		return mapper.qryDictionaryItemByDictCode(dictCode);
	}

	@Override
	public Integer dictionaryCount(Dictionary dict) {
		return mapper.dictionaryCount(dict);
	}

	@Override
	public List<Dictionary> selectPageDictionaries(Dictionary dict) {
		return mapper.selectPageDictionaries(dict);
	}

	@Override
	public void saveDict(Dictionary dict) {
		mapper.saveDict(dict);
	}

	@Override
	public void updateDict(Dictionary dict) {
		mapper.updateDict(dict);
	}

	@Override
	public void deleteDict(String dictId) {
		mapper.deleteDict(dictId);
	}

	@Override
	public Dictionary selectDictById(String dictId) {
		return mapper.selectDictById(dictId);
	}
}
